namespace ui {
	export enum StartGameEvent {
		StartGameBtn = 1000,
	}

	export class StartGame extends core.BaseEuiView {
		private BaseGroup: eui.Group
		private GameNameL: eui.Label
		private StartBtn: eui.Button

		public constructor(controller: core.BaseController, parent: egret.DisplayObjectContainer) {
			super(controller, parent)
			this.addEventListener(eui.UIEvent.COMPLETE, this.onComplete, this)
			core.App.ViewManager.register(ui.ViewConst.StartGame, this)
		}

		protected partAdded(partName: string, instance: any): void {
			super.partAdded(partName, instance);
		}

		protected childrenCreated(): void {
			super.childrenCreated();
		}

		private onComplete(evt: eui.UIEvent) {
			this.BaseGroup.x = 0
			this.BaseGroup.y = 0
			this.BaseGroup.anchorOffsetX = 0
			this.BaseGroup.anchorOffsetY = 0
			this.BaseGroup.width = egret.MainContext.instance.stage.stageWidth
			this.BaseGroup.height = egret.MainContext.instance.stage.stageHeight
			this.StartBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onStartBtnTap, this)
		}

		private onStartBtnTap(evt: egret.TouchEvent) {
			console.log("onStartBtnTap")
			this.applyFunc(StartGameEvent.StartGameBtn)
		}
	}
}